import http from '@src/util/http';

const headerUrl='/api/voice';

/**
 * @description 获取机器人列表
 * @param {*} params 
 */
export function getRobotList(params={}){
  return http.post(`${headerUrl}/outside/intelligent/quality/getList`,params);
}

/**
 * @description 创建机器人
 * @param {*} params 
 */
export function createRobot(params={}) {
    return http.post(`${headerUrl}/outside/intelligent/quality/create`,params);
}

/**
 * @description 编辑质检机器人
 * @param {*} params 
 */
export function updateRobot(params={}) {
    return http.post(`${headerUrl}/outside/intelligent/quality/update`,params);
}

/**
 * @description 获取质检机器人详情
 * @param {*} params 
 */
export function getRobotDetail(params={}) {
    return http.get(`${headerUrl}/outside/intelligent/quality/getDetail`,params);
}

/**
 * @description 开启或者关闭质检机器人
 */

export function switchRobot(params={}) {
    return http.get(`${headerUrl}/outside/intelligent/quality/switch`,params);
}

/**
 * @description 删除质检机器人
 */

export function deleteRobot(params={}) {
    return http.get(`${headerUrl}/outside/intelligent/quality/delete`,params);
}

/**
 * @description 获取质检的执行表单
 * @param {*} params 
 */
export function getIntelligentActionForm(params={}) {
    return http.get(`${headerUrl}/outside/intelligent/quality/getFormList`, params)
}

/**
 * @description 获取质检的执行表单的字段
 * @param {*} params 
 */
export function getIntelligentActionFormFields(params={}) {
    return http.get(`${headerUrl}/outside/intelligent/quality/getFormFieldList`, params)
}

/**
 * @description 获取质检机器人执行情况
 */

export function getQualityRun(params={}) {
    return http.get(`${headerUrl}/outside/intelligent/quality/getQualityRun`, params)
}

/**
 * @description 获取质检机器人执行明细情况
 */
export function getQualityRunList(params={}) {
    return http.get(`${headerUrl}/outside/intelligent/quality/getQualityRunDetail`, params)
}

/**
 * @description 更新质检机器人名称
 */

export function updateRobotName(params={}) {
    return http.post(`${headerUrl}/outside/intelligent/quality/updateName`, params)
}

/**
 * @description 获取质检机器人执行数据情况
 * @param {*} params 
 */
export function getQualityDataInfo(params={}) {
    return http.post(`${headerUrl}/outside/intelligent/quality/getQualityRunDataList`, params)
}